<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/work_today.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/tips.js"></script>
<script src="${staticServer}/inc/js/model_resp.js"></script>
<script>

$(function(){
	$("#type").val(${type});
})


var selectMsg = function(){
	var btnInvalid = $("#btnInvalid").is(':checked')
	var url = "${contextPath}/index/consultant_student_list.htm";
	var ps = param(location.href);
	
	var type = $("#type").val();
	var key = $("#keyword").val();
	var param_str = "";
	if(key!=""){ 
		param_str += "&key=" + key + "&type=" + type;
	}
	url = "?" + param_str+"&btnInvalid="+btnInvalid;
	location.href = url;

}

var selectMsg2 = function(){
	window.location.href=encodeURI("${contextPath}/index/consultant_student_list.htm");
}
/**
* 成长咨询学员
*/
var czzx = function(){
	window.location.href=encodeURI("${contextPath}/index/getZXstudent.htm");
}
</script>
</head>

<body>
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>咨询师业务管理</li>
			<li>&gt;</li>
			<li class="current">学员查询</li>
		</ul>
	</div>
	<div id="container">
		<div id="title"></div>
		<table class="form_table">
			<tr>
				<td><label><b>查询条件：</b></label>
				<select id="type" name="type">
						<option value="0">客户名字</option>
						<option value="1">学员名字</option>
						<option value="2">联系电话</option>
						<option value="3">QQ号码</option>
						<option value="4">邮箱地址</option>
						<option value="5">关键词</option>
                </select>
				<input type="text" name="keyword" id="keyword" size="25" value="${key}" />
				<input type="button" value=" 查 询 " onclick="selectMsg()" />
				<input type="button" value=" 重 置 " onclick="selectMsg2()" />
				<input type="button" value=" 成长咨询学员 " onclick="czzx();" />
				<label for="btnInvalid"><input type="checkbox" <#if client??><#if client.invalid=="0">checked</#if></#if> id="btnInvalid" style="margin-top: 6px;" />隐藏无效客户</label></td>
			</tr>
		</table>
		<table>
			<tr class="fields">
				<th>学员名字</th>
				<th>客户姓名</th>
				<th>联系方式</th>
				<th>性别</th>
				<th>年龄</th>
				<th>生日日期</th>
				<th>所在学校</th>
				<th>学员特征和资料</th>
				<th>操作</th>
			</tr>
			
			<#if list??>
			<#list list as list>
				<tr class="even_row">
					<td align="center" class="stress">${list.nickname}</td>
					<td align="center">${list.clientns}<em class="valid"><#if list.invalid=="0"><em class="valid">(有效客户)<#else><em class="caption">(无效客户)</#if></em></td>					
					<td align="center">
					<a title="<#if list.phone!="" && list.phone?contains('[]')==false>电话：${list.phone}</#if> <#if list.qq!="">QQ：${list.qq}</#if> <#if list.weixin!="">微信：${list.weixin}</#if> <#if list.email!="">邮箱：${list.email}</#if> " id="${list.id}">
					<#if list.phone!="" && list.phone?contains('[]')==false>
     						<em class="caption">电话：</em>${list.phone}
     						<#elseif list.qq!="">
     						<em class="caption">QQ:</em>${list.qq}
     						<#elseif list.weixin!="">
     						<em class="caption">微信:</em>${list.weixin}
     						<#elseif list.email!="">
     						<em class="caption">email:</em>${list.email}
					</#if>
					</a>
					</td>
					<td align="center">${list.sex}</td>
					<td align="center">${list.age} 岁</td>
					<td align="center"><em class="caption">${list.thday} </em></td>
					<td>${list.school} </td>
					<td id="" style="width:250px;" title="${list.feature}"><#if list.feature!="" && list.feature?replace("<.*?>","","r")?length gt 50>${list.feature?replace("<.*?>","","r")?substring(0,50)}...<#else>${list.feature}</#if></td>
					<td align="center">
					<a href="${contextPath}/index/consultant_client.htm?keyname=${list.pkey}">详情</a>
					-<a href="${contextPath}/index/addMoenys.htm?stu_id=${list.id}">添加缴费</a>
					<#if list.clregion!=null && list.clregion!="">
					-
					<a href="${contextPath}/index/consultant_apply_add.htm?id=${list.id}&region=${list.clregion}&bool=${list.bool}">方案申请</a>
					</#if>
					</td>
					
				</tr>
			</#list>
			</#if>
		</table>
	</div>
	<div id="pager" style="width: 820px;">
	<ul id="pagination">
		<#if page??>
		<#if page.pagetotal?? && page.pagetotal!="0">
	<#assign pagetotal = page.pagetotal>
	<#else>
	<#assign pagetotal = 1>
	</#if>
			<#if page.currpage??>
	<#assign currpage = page.currpage>
	<#else>
	<#assign currpage = 1>
	</#if>
				<#if currpage==1 >
					<li class="previous-off">上一页</li>
					<#else>
					<li class="previous"><a href="${contextPath}/index/consultant_student_list.htm?currPage=${currpage-1}">上一页</a></li>
					</#if>
					
		<#if pagetotal<=11>
			<#list 1..pagetotal as index_up>  
	           <#if currpage==index_up > 
	           		<li class="current">${index_up}</li>
	           <#else>
	           		<li><a href="${contextPath}/index/consultant_student_list.htm?currPage=${index_up}">${index_up}</a></li>  
	           </#if>  
			</#list>  
		<#else>
			<#if currpage<=8 >
				<#list 1..9 as index_up>  
	           	<#if currpage==index_up >  
	            	<li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/consultant_student_list.htm?currPage=${index_up}">${index_up}</a></li> 
	           	</#if>
	           	</#list>  
	           	<li>...</li>
	           	<li><a href="${contextPath}/index/consultant_student_list.htm?currPage=${pagetotal}">${pagetotal}</a></li>  
				
			<#elseif (currpage>= 9 && currpage<pagetotal-7)  >	
				<li><a href="${contextPath}/index/consultant_student_list.htm?currPage=1">1</a></li>  
				<li>...</li>
				<#list currpage-3..currpage+3 as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/consultant_student_list.htm?currPage=${index_up}">${index_up}</a></li>  
	           	</#if>
	           	</#list>
				<li>...</li>
	           	<li><a href="${contextPath}/index/consultant_student_list.htm?currPage=${pagetotal}">${pagetotal}</a></li>   
			<#else>
				<li><a href="${contextPath}/index/consultant_student_list.htm?currPage=1">1</a></li> 
				<li>...</li>
				<#list pagetotal-8..pagetotal as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/consultant_student_list.htm?currPage=${index_up}">${index_up}</a></li> 
	           	</#if>
				</#list>  
			</#if>
			
		</#if> 
		<#if currpage==pagetotal >
		 	<li class="previous-off">下一页</li>
		<#else>
			<li class="previous"><a href="${contextPath}/index/consultant_student_list.htm?currPage=${currpage+1}">下一页</a></li>
		</#if>
		<li class="pageinfo">共${page.total}条记录</li>
	</#if>
	</ul></div>
	<div class="emptyline"></div>
</body>
</html>